import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';

const tableName = `output_scenarios_pu_data`;

@Entity(tableName)
export class ScenariosPuOutputGeoEntity {
  @ApiProperty()
  @PrimaryGeneratedColumn('uuid')
  id!: string;

  /**
   * references ScenariosPlanningUnitGeoEntity.planningUnitMarxanId
   */
  @Column({
    type: 'uuid',
    nullable: true,
    name: `scenario_pu_id`,
  })
  scenariosPuId?: number | null;
  /**
   * Describes the id generated by marxan that represent each iteration over the algorithm
   */
  @Column({
    type: `int`,
    nullable: true,
    name: `included_count`,
  })
  includedCount?: number | null;

  /**
   * Score of the run
   */
  @Column({
    name: `value`,
    array: true,
    type: 'boolean',
    nullable: false,
  })
  values!: Array<boolean>;
}
